home *** CD-ROM | disk | FTP | other *** search
/ Invisible Universe / Invisible Universe (1995)(Voyager)[Mac-PC].iso / mac / MOVIES / SHARED.DIR / 01047_Script_sbtt < prev    next >
Text File  |  1995-11-21  |  2KB  |  65 lines

  1. -- standard button trios
  2. --property myNormal, myRollover, myPressed, myChannel, myScript, ancestor
  3.  
  4. --on birth me, no, sp, ro, pr, sc
  5. --  set ancestor to birth(script "sb",sp,sc)
  6. --  set myNormal to (the number of cast no)
  7. --  set myRollover to (the number of cast ro)
  8. --  set myPressed to (the number of cast pr)
  9. --  set myScript to sc
  10. --  set myChannel to integer(sp)
  11. --  return me
  12. --end
  13.  
  14. --change appearance
  15. on sbttrollo myChannel, dummy
  16.   global gsbttnormal 
  17.   
  18.   --if the castNum of sprite myChannel = myRollOver then exit
  19.   
  20.   set gsbttnormal = the castNum of sprite myChannel
  21.   set rollNum = integer(the name of cast gsbttNormal)
  22.   
  23.   --put ">>>my rollover cast 1003 " & myChannel && myRollover
  24.   puppetSprite myChannel,TRUE
  25.   set the castNum of sprite myChannel to rollNum
  26.   updateStage
  27.   --puppetSprite myChannel, false
  28. end
  29.  
  30. on sbttpress theLine
  31.   global gsbttNormal
  32.   
  33.   set myChannel = integer(item 1 of theLine)
  34.   set myPressed = integer(the name of cast gsbttNormal) + 1  
  35.   
  36.   puppetSprite myChannel,TRUE
  37.   set the castNum of sprite myChannel to myPressed
  38.   updateStage
  39.   puppetSprite myChannel, false
  40. end
  41.  
  42. on sbttnorm theLine
  43.   global gsbttnormal
  44.   
  45.   --put theLine
  46.   set myChannel = integer(item 4 of theLine)
  47.   set the castNum of sprite myChannel = gsbttnormal
  48.   
  49.   puppetSprite myChannel, false
  50.   updateStage
  51.   --go to the frame
  52.   --put ">>>sbtnorm " & myChannel
  53.   --put the puppet of sprite myChannel
  54.   --put the castNum of sprite myChannel
  55.   --  puppetSprite myChannel,TRUE
  56.   --  set the castNum of sprite myChannel to myNormal
  57.   --  updateStage
  58.   --  puppetSprite myChannel, false
  59. end
  60.  
  61. on sbttdoScript theLine
  62.   set command = item 7 of theLine
  63.   do command
  64. end  
  65.